The present invention relates to moving picture coding and decoding technologies using a motion-compensated prediction and, more particularly, to a moving picture coding device, a moving picture coding method, and a moving picture coding program, and a moving picture decoding device, a moving picture decoding method, and a moving picture decoding program that are used for a motion-compensated prediction.
In moving picture coding represented by MPEG-4 AVC/H.264 (hereinafter, referred to as AVC) or the like, a motion-compensated prediction is used in which a picture is partitioned into rectangular blocks, and a motion is estimated and compensated between pictures in units of blocks. In the motion-compensated prediction, in order to reduce the coding amount of a motion vector generated in each block, a prediction process is performed.
In the AVC, a predicted value is calculated based on a neighboring block by using the presence of a strong correlation between motion vectors of neighboring blocks, and a differential vector with respect to the predicted value is coded, whereby the coding amount is reduced. However, in such a prediction method, since the position of the neighboring block to be referred to is limited, a difference between motion vectors is large when the prediction is incorrect, and there is a problem in that the amount of generated coding increases. In addition, although the coding amount of the motion vector is reduced, the other motion information such as a predicted direction, a reference picture index, and the like is coded for each processing target block, and accordingly, there is a problem in that efficient coding is not achieved.
In order to solve such problems, as disclosed in Japanese Patent Application Laid-Open No. JP 10-276439 A, a merge coding technology is used in which, by coding additional information used for specifying a neighboring bock from among a plurality of neighboring blocks, motion information of a processing target block is not coded, but coding is performed using the motion information of a neighboring block, whereby the coding amount is reduced.
According to the merge coding, instead of coding the motion information of a processing target block, coding is performed by using the motion information of a block that is neighboring in space and time, and accordingly, the coding amount is reduced to improve the coding efficiency. In addition, by preparing a plurality of candidates for the neighboring block to be referred to and coding the additional information specifying the neighboring block to be referred to, a neighboring block of which the motion information is closer to the motion information of the coding target block can be referred to.
Accordingly, in a case where a plurality of neighboring blocks having the same motion information are included in reference neighboring block candidates, the number of kinds of motion information that can be represented by the reference neighboring block candidates is small, and, consequently, the improvement of the coding efficiency is not achieved. However, in a case where the motion information of the reference neighboring block candidates is compared in detail, and reference neighboring block candidates having the same motion information are removed, the processing amount increases.